home *** CD-ROM | disk | FTP | other *** search
/ Scene Storm / Scene Storm - Volume 1.iso / coding / c / pdc / lib / src / createstdio.c < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-06  |  590 b   |  26 lines

  1. #include <exec/memory.h>
  2. #include <exec/ports.h>
  3. #include <exec/io.h>
  4.  
  5. struct IOStdReq *
  6. CreateStdIO (taskReplyPort)
  7. struct MsgPort *taskReplyPort;
  8. {
  9.     struct IOStdReq *myStdReq;
  10.  
  11.     if (taskReplyPort == 0) {
  12.         myStdReq = 0;
  13.         }
  14.     else {
  15.         myStdReq = AllocMem (sizeof (*myStdReq), MEMF_CLEAR | MEMF_PUBLIC);
  16.         if (myStdReq != 0) {
  17.             myStdReq->io_Message.mn_Node.ln_Type = NT_MESSAGE;
  18.             myStdReq->io_Message.mn_Node.ln_Pri = 0;
  19.             myStdReq->io_Message.mn_ReplyPort = taskReplyPort;
  20.             }
  21.         }
  22.  
  23.     return (myStdReq);
  24. }
  25.  
  26.